import request from '@/utils/request'

// 查询爬虫字段规则配置列表
export function listFieldRule(query) {
  return request({
    url: '/spider/fieldRule/list',
    method: 'get',
    params: query
  })
}

// 查询爬虫字段规则配置详细
export function getFieldRule(id) {
  return request({
    url: '/spider/fieldRule/' + id,
    method: 'get'
  })
}

// 新增爬虫字段规则配置
export function addFieldRule(data) {
  return request({
    url: '/spider/fieldRule',
    method: 'post',
    data: data
  })
}

// 修改爬虫字段规则配置
export function updateFieldRule(data) {
  return request({
    url: '/spider/fieldRule',
    method: 'put',
    data: data
  })
}

// 删除爬虫字段规则配置
export function delFieldRule(id) {
  return request({
    url: '/spider/fieldRule/' + id,
    method: 'delete'
  })
}

// 导出爬虫字段规则配置
export function exportFieldRule(query) {
  return request({
    url: '/spider/fieldRule/export',
    method: 'get',
    params: query
  })
}